package com.smart.community.admin.controller;

import com.smart.community.admin.common.qo.SysUserQo;
import com.smart.community.admin.service.SysUserService;
import com.smart.community.common.base.result.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/auth")
public class AuthController {
    @Resource
    SysUserService sysUserService;

    @PostMapping("/login")
    public ResponseResult<String> login(SysUserQo sysUserQo) {
        return ResponseResult.success(sysUserService.login(sysUserQo.getUsername(), sysUserQo.getPassword()));
    }

//    public String phoneLogin(String phone, String code) {
//    }
}
